package com.wmh.baseservice.common.utils.page.pojo;

import com.wmh.baseservice.common.mybatisplus.enums.SortMode;
import com.wmh.baseservice.common.mybatisplus.query.FilterReqItem;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 分页对象
 */
@ApiModel(value = "分页对象", description = "分页对象")
@Data
@Accessors(chain = true)
public class PageInfo {

    @ApiModelProperty(value = "页码", name = "pageNo", example = "1", required = true)
    @NotNull(message = "请求参数错误,缺少列表页码信息")
    private Integer pageNo = 1;
    @ApiModelProperty(value = "一页的数量", name = "pageSize", example = "10", required = true)
    @NotNull(message = "请求参数错误,缺少列表单页数量信息")
    private Integer pageSize = 10;
    @ApiModelProperty(value = "是否进行count查询", name = "isCount", example = "true")
    private Boolean isCount;

	@ApiModelProperty(value = "排序字段", name = "sortField", example = "createTime")
	private String sortField;

	@ApiModelProperty(value = "排序模式", name = "sortMode", example = "ASC")
	private SortMode sortMode;

	@ApiModelProperty(value = "过滤参数列表", name= "filterParams",example = "[{prop: \"visitorNum\", mode: \"INTEGER_SCOPE\", value: \"[0,6]\"}]")
	private List<FilterReqItem> filterParams;



}
